package com.epam.necklace.view.menu.mainmenu.submenu.submenugems;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;

import com.epam.necklace.view.menu.Menu;
import com.epam.necklace.view.menu.MenuItem;
import com.epam.necklace.view.menu.mainmenu.submenu.BackMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenugems.order1menu.DiamondMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenugems.order1menu.EmeraldMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenugems.order1menu.RubyMenu;


public class Order1 extends MenuItem {
	private static final Logger log = Logger.getLogger(Order1.class);
	private final Menu subMenu;
	private static final List<MenuItem> items;

	static {
		items = new ArrayList<MenuItem>();
		items.add(new DiamondMenu());
		items.add(new EmeraldMenu());
		items.add(new RubyMenu());
		items.add(new BackMenu());
	}

	public Order1() {
		super("First-order", "1");
		subMenu = new Menu(items);
	}

	@Override
	public boolean execute() {
		log.info("first-order comand");
		subMenu.run();
		return true;
	}

}
